package com.wenan.ui.grids
{
	import mx.controls.dataGridClasses.DataGridColumn;
	import mx.core.ClassFactory;
	
	public class DataGridColumnClassFactory extends ClassFactory
	{
		private var _column:DataGridColumn;
		
		public function DataGridColumnClassFactory(column:DataGridColumn, generator:Class=null)
		{
			super(generator);
			
			this._column = column;
		}

		public function get column():DataGridColumn
		{
			return _column;
		}
		
		public override  function newInstance():* 
		{ 
			var instance:Object = new generator(); 
			
			if (properties != null) 
			{ 
				for (var p:String in properties) 
				{ 
					instance[p] = properties[p]; 
				} 
			} 
			
			instance.column = this._column;
			
			return instance; 
		} 
	}
}